from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver=webdriver.Firefox()
driver.maximize_window()
driver.get('https://www.baidu.com/')
time.sleep(5)

news=driver.find_element(By.CLASS_NAME,'mnav c-font-normal c-color-t')
news.click()
print(news.location)
print(news.size)
print(news.is_displayed())
print(news.is_selected())
print(news.is_enabled())
time.sleep(2)

# driver.switch_to.window(driver.window_handles[-1])
# time.sleep(2)
#
# driver.find_element(By.PARTIAL_LINK_TEXT,'两重').click()
# time.sleep(2)
#
# driver.switch_to.window(driver.window_handles[-1])
# time.sleep(2)
#
# driver.execute_script('window.scrollTo(0,2000)')
# time.sleep(2)
#
# driver.execute_script('window.scrollTo(0,document.body.scrollHeight)')
# time.sleep(2)
#
# driver.execute_script('window.scrollTo(0,0)')
# time.sleep(2)

